package controller

import (
	"test-gin/service"

	"github.com/gin-gonic/gin"
)

func InitUserController(r *gin.Engine) {
	r.GET("/test-gin/user/allUser", func(c *gin.Context) {
		userList := service.GetUserService().GetAllUsers()
		c.JSON(200, gin.H{
			"code": 200,
			"msg":  "success",
			"data": userList,
		})
	})
} // 用户相关接口
